<div class="block">
  <div class="content">
    <div class="inner">
      <h2>メッセージ表示</h2>

      <%
         table_width = 800
         th_width = 150
         td_width = 650
      %>
      <table class="table" width="<%= table_width %>" border="1">
        <tr><th width="<%= th_width %>">タイトル</th><td width="<%= td_width %>"><%= @message.subject %></td></tr>
        <tr><th width="<%= th_width %>">送信者</th><td width="<%= td_width %>"><%= @message.user.nick_name %></td></tr>
        <tr><th width="<%= th_width %>">受信日時</th><td width="<%= td_width %>"><%= @message.created_at %></td></tr>
        <tr><th width="<%= th_width %>">To</th><td width="<%= td_width %>"><%= @message.to_addrs %></td></tr>
        <tr><th width="<%= th_width %>">Cc</th><td width="<%= td_width %>"><%= @message.cc_addrs %></td></tr>
      </table>

      <h3>本文</h3>
      <%= text_format(@message.body, @message.format_type) %>
      <hr />
      <%= render :partial => "attachments" %>

    </div>
  </div>
</div>

<div class="block">
  <div class="content">
    <div class="inner newLink">
      <%= link_to "返信", edit_portal_message_path(@message) %>
      　 
      <%= link_to "削除", portal_message_path(@message),
                  :method => :delete,
                  :confirm => "本当に削除しますか？" %>
      　
      <%= link_to "戻る", portal_messages_path %>
    </div>
  </div>
</div>
